package struct.scene
{
	import com.common.displayObjects.ComponentChildren;
	
	import flash.display.BitmapData;
	import flash.display.Graphics;
	
	import utils.Util;
	
	public class Map extends ComponentChildren
	{
		public static var _instance:Map;
		
		
		public function Map(_w:Number, _h:Number)
		{
			super(_w, _h);
		}
		
		public static function getInstance():Map
		{
			if (!_instance)
			{
				_instance = new Map(800, 600);
			}
			return Map._instance;
		}
				
		public function setMap(mapClassName:String):void
		{
			var bmd:BitmapData = Util.getBitmapData(mapClassName);
			var g:Graphics = graphics;
			g.beginBitmapFill(bmd);
			g.drawRect(0, 0, bmd.width, bmd.height);
			g.endFill();
		}
				
	}
}